/*************************************************************************
	> File Name: client.cpp
	> Author: ma6174
	> Mail: ma6174@163.com 
	> Created Time: 2021年12月03日 星期五 20时55分26秒
 ************************************************************************/

#include<iostream>
#include "iterator.h"
using namespace std;

int main()
{
	Aggregate* a = new ConcreteAggregate();

	a->append("大鸟");
	a->append("小菜");
	a->append("行李");
	a->append("老外");
	a->append("公交内部员工");
	a->append("小偷");

	Iterator* i = new ConcreteIterator(a);
	std::string item = i->first();
	
	while (!(i->isDone()))
	{
		cout << i->currentItem() << ", 请买车票! " << endl;
		i->next();
	}

	return 0;
}
